﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Furion.CMS.Application.Dto
{
    /// <summary>
    /// 权限配置发布数据传输对象
    /// </summary>
    public class PermissionConfigReleaseDto : PermissionConfigDto
    {
        public PermissionConfigReleaseDto()
        {
            DeleteCodes = new string[0];
        }

        /// <summary>
        /// 权限代码
        /// </summary>
        [Required(ErrorMessage = "权限代码必填")]
        public override string Code { get => base.Code; set => base.Code = value; }
        /// <summary>
        /// 父权限路径
        /// </summary>
        [Required(ErrorMessage = "父权限路径必填")]
        public override string[] ParentPaths { get => base.ParentPaths; set => base.ParentPaths = value; }

        /// <summary>
        /// 删除的代码
        /// </summary>
        public string[] DeleteCodes { get; set; }
    }
}
